

import commonApi from '@/api/common'

// oss上传配置信息配置，可以直接返回，也可以通过调接口之后返回
const ossConfig = async function () {

	//发起后端请求签名
	let res = await commonApi.getOssCredential();

	// 下面这4个信息必填
	let url = `https://${res.data.bucket}.oss-${res.data.regionId}.aliyuncs.com/`;
	let OSSAccessKeyId = res.data.accessKeyId
	let OssAccesskeySercet = res.data.accessKeySecret;
	let OssSecurityToken = res.data.securityToken;

	return {
		url,
		OSSAccessKeyId,
		OssAccesskeySercet,
		OssSecurityToken
	}
}

export default ossConfig;